from django.contrib import admin
from .models import Subject

@admin.register(Subject)
class SubjectAdmin(admin.ModelAdmin):
    # 我将添加需要查询的字段到 search_fields 中
    search_fields = ['id', 'name', 'parent', 'type']
    # 指定可过滤的字段
    list_filter = ['parent','type']
    # 我将添加需要显示的字段到 list_display 中
    list_display = ('id','name','parent', 'type')
    # 我将添加需要排序的字段到 ordering 中
    ordering = ('id',)


# Register your models here.
